package org.cloudnote.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.cloudnote.bean.User;
import org.springframework.stereotype.Component;


public interface UserMapper {
    @Select("select * from cn_user where cn_user_name=#{username}")
    @ResultMap("userResultMap")
    public User getByName(String username);

    @Insert("insert into cn_user values (#{id},#{username},#{password},#{token},#{nick})")
    public void register(User user);
}
